@use "sass:color";

/* You can add global styles to this file, and also import other style files */
monk-form-design {
  aside {
    nz-collapse {
      .ant-collapse-content {
        .ant-collapse-content-box {
          padding: 0;
        }
      }
    }
    nz-tabset{
      nz-tabs-nav{
        .ant-tabs-nav-wrap{
          display: flex;
          justify-content: space-around;
        }
      }
    }
  }


  $primary-color: #13c2c2;
  $layout-color: #9867f7;

  $primary-background-color: color.change($primary-color, $alpha: 0.06);
  $primary-hover-bg-color : color.change($primary-color, $alpha: 0.20);
  $layout-background-color : color.change($layout-color, $alpha: 0.12);
  $layout-hover-bg-color : color.change($layout-color, $alpha: 0.24);

  $title-text-color: #fff;
  $border-color : #ccc;

  $left-right-width : 270px;
  $header-height : 56px;
  $operating-area-height : 45px;

  section {
    flex: 1;
    max-width: calc(100% - $left-right-width - $left-right-width);
    user-select: none;
    margin: 0 8px 0;
    box-shadow: 0px 0px 1px 1px $border-color;



    // 内容操作区域
    .form-panel {
      // height       : calc(100% - 50px);
      height: 100%;
      background: #eee;
      // border       : 1px solid #ccc;
      position: relative;

      &.no-toolbars-top {
        height: calc(100% - 50px);
      }

      >.hint-text {
        position: absolute;
        left: 0;
        top: 45%;
        width: 100%;
        text-align: center;
        font-size: 20px;
        color: #aaa;
        z-index: 16;
      }

      .a-form-box {
        height: 100%;
        // box-shadow: 0px 1px 5px 1px #ccc;
      }

      .draggable-box {
        height: 100%;
        overflow: auto;

        .list-main {
          min-height: 100%;
          padding: 5px;
          position: relative;
          background: #fafafa;
          // border    : 1px #ccc dashed;

          .moving {
            // 拖放移动中
            // outline-width: 0;
            min-height: 35px;
            box-sizing: border-box;
            overflow: hidden;
            padding: 0 !important;
            // margin       : 3px 0;
            position: relative;

            &::before {
              content: '';
              height: 5px;
              width: 100%;
              background: $primary-color;
              position: absolute;
              top: 0;
              right: 0;
            }
          }

          .drag-move-box {
            position: relative;
            box-sizing: border-box;
            padding: 8px;
            overflow: hidden;
            transition: all .3s;
            min-height: 36px;

            &:hover {
              background: $primary-hover-bg-color;
            }

            // 选择时 start
            &::before {
              content: '';
              height: 5px;
              width: 100%;
              background: $primary-color;
              position: absolute;
              top: 0;
              right: -100%;
              transition: all .3s;
            }

            &.active {
              &::before {
                right: 0;
              }

              background : $primary-hover-bg-color;
              outline-offset: 0;
            }

            // 选择时 end
            .form-item-box {
              position: relative;
              box-sizing: border-box;
              word-wrap: break-word;

              &::before {
                content: "";
                position: absolute;
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                z-index: 888;
              }

              .ant-form-item {
                // 修改ant form-item的margin为padding
                margin: 0;
                padding-bottom: 6px;
              }
            }

            .show-key-box {
              // 显示key
              position: absolute;
              bottom: 2px;
              right: 5px;
              font-size: 14px;
              z-index: 999;
              color: $primary-color;
            }

            >.copy,
            >.delete {
              position: absolute;
              top: 0;
              width: 30px;
              height: 30px;
              line-height: 30px;
              text-align: center;
              color: #fff;
              z-index: 989;
              transition: all .3s;

              &.unactivated {
                opacity: 0 !important;
                pointer-events: none;
              }

              &.active {
                opacity: 1 !important;
              }
            }

            >.copy {
              border-radius: 0 0 0 8px;
              right: 30px;
              background: $primary-color;
            }

            >.delete {
              right: 0px;
              background: $primary-color;
            }

          }

          // 动态表格设计面板样式
          .batch-box {
            >.batch-label {
              font-size: 16px;
              font-weight: 500;
              padding: 10px 10px;
            }

            .draggable-box {
              min-height: 80px;
              width: 100%;
              border: 1px #ccc dashed;
              background: #fff;

              .list-main {
                min-height: 60px;
                position: relative;
                border: 1px #ccc dashed;
                overflow-x: auto;
                overflow-y: auto;
                white-space: nowrap;

                .moving {
                  // 拖放移动中
                  width: 175px;
                  min-height: 94px;
                  display: inline-block;
                }

                >div {
                  min-width: 185px;
                  display: inline-block;
                  vertical-align: top;

                  .ant-form-item>.ant-form-item-label,
                  .ant-form-item>.ant-form-item-control-wrapper {
                    text-align: left;
                    display: block;
                  }

                  .ant-col {
                    width: 100%;
                  }

                }
              }
            }
          }

          .batch-box,
          .grid-box,
          .table-box {
            position: relative;
            box-sizing: border-box;
            padding: 5px;
            background: $layout-background-color;
            width: 100%;
            transition: all .3s;
            overflow: hidden;

            .form-item-box {
              position: relative;
              box-sizing: border-box;

              .ant-form-item {
                // 修改ant form-item的margin为padding
                margin: 0;
                padding-bottom: 15px;
              }
            }

            .grid-row,
            .table-layout {
              background: $layout-background-color;


              .grid-col,
              .table-td {
                .draggable-box {
                  min-height: 80px;
                  min-width: 50px;
                  border: 1px #ccc dashed;
                  background: #fff;

                  .list-main {
                    min-height: 80px;
                    position: relative;
                    border: 1px #ccc dashed;
                  }
                }
              }
            }

            // 选择时 start
            &::before {
              content: '';
              height: 5px;
              width: 100%;
              background: transparent;
              position: absolute;
              top: 0;
              right: -100%;
              transition: all .3s;
            }

            &.active {
              &::before {
                background: $layout-color;
                right: 0;
              }

              background : $layout-hover-bg-color;
              outline-offset: 0;
            }

            >.copy,
            >.delete {
              position: absolute;
              top: 0px;
              width: 30px;
              height: 30px;
              line-height: 30px;
              text-align: center;
              color: #fff;
              z-index: 989;
              transition: all .3s;

              &.unactivated {
                opacity: 0 !important;
                pointer-events: none;
              }

              &.active {
                opacity: 1 !important;
              }
            }

            >.copy {
              border-radius: 0 0 0 8px;
              right: 30px;
              background: $layout-color;
            }

            >.delete {
              right: 0px;
              background: $layout-color;
            }
          }
        }
      }
    }
  }
}

.k-form-build-9136076486841527 {

  .select-input-list-box {
    color: rgba(0, 0, 0, 0.65);
    font-size: 14px;

    .ant-form-item {
      margin-bottom: 2px;
      margin-right: 8px
    }

    &.ant-form-horizontal {
      .ant-col.ant-form-item-control-wrapper {
        height: 30px;
        display: flex;
        align-items: center;
      }

      .text-box {
        height: 30px;
        line-height: 30px;
      }
    }

  }

  .ant-form-item {
    margin-bottom: 16px;
  }

  // 防止报错信息占位
  .ant-form-item-control {
    position: relative;

    .ant-form-explain {
      bottom: -16px;
      position: absolute;
      z-index: 10;
    }
  }

  &.ant-form-inline {
    .ant-form-item-control-wrapper {
      width: 175px !important;
    }
  }

  // 动态表格样式
  .batch-table {
    .ant-form-item {
      margin: 0;
    }

    .ant-form-item-control-wrapper {
      width: 170px !important;
    }

    .ant-table-thead>tr>th {

      padding: 12px;
    }

    .ant-table-tbody>tr>td {
      padding: 8px;
    }

    .ant-form-inline .ant-form-item-with-help {
      margin: 0;
    }

    .ant-table-placeholder {
      padding: 0;
    }
  }

  // 拖拽上传控件隐藏
  .hide-upload-drag {
    .ant-upload.ant-upload-drag {
      display: none;
    }
  }

}

.kk-table-9136076486841527 {
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s;
  border-collapse: collapse;
  
  tr {
    transition: all 0.3s;
    border-collapse: collapse;
    td {
      box-sizing: border-box;
      transition: all 0.3s;
      padding: 12px 12px;
      border-collapse: collapse;
      vertical-align:top;
    }
  }
  &.bordered {
    // 添加边框
    tr {
      td {
        border: 1px solid #e8e8e8 !important;
      }
    }
  }
  &.bright {
    // 点亮行
    tr {
      &:hover > td {
        background: #e6f7ff;
      }
    }
  }
  &.small {
    // 紧凑型
    tr {
      td {
        padding: 8px 8px;
      }
    }
  }
  .ant-row.ant-form-item{
    margin: 0 !important;
  }
}